package java面向对象.对象引用传递;

//对象引用传递
public class text2 {
    public static void main(String[] args) {
        Student1 stu1 = new Student1();
        stu1.name = "张三";
        stu1.age = 18;
        stu1.sex = "男";
        Student1 stu2 = stu1;
        stu2.name = "李四";
        stu2.age = 20;
        stu2.sex = "女";
        stu1.study();
        stu2.study();

    }
}
